<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>用户修改</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
   <form name="modifyForm" action="<%=path%>/users/Userinfo_update.action" method="post">
<table width="400" >
  <tr>
    <td width="30%">用户名：</td>
    <!-- id值从上下文获取 -->
    <td><input type="text" name="userid" value='<s:property value="#session.modify_user.userid"/>'  readonly="readonly"/></td>
  </tr>
  <tr>
    <td width="30%">昵称：</td>
    <td><input type="text" name="username" value='<s:property value="#session.modify_user.username"/>'/></td>
  </tr>
  <tr>
  
  <td>密码：</td>
    <td><input name="password" type="password" value="<s:property value="#session.modify_user.password" />"/>
    </td>
   </tr> 
   
  <tr>
    <td>性别：</td>
    <td>
      <s:if test='%{#session.modify_user.gender=="男"}'>
         <input type="radio" name="gender" value="男" checked="checked"/>男
         <input type="radio" name="gender" value="女"/>女
      </s:if>
      <s:else>
         <input type="radio" name="gender" value="男" />男
         <input type="radio" name="gender" value="女" checked="checked"/>女
      </s:else>
      </td>
  </tr>
  <tr>
    <td>地址：</td>
    <td><input name="address" type="text" value="<s:property value="#session.modify_user.address" />"/>
    </td>
  </tr>
  
  <tr>
    <td>邮箱：</td>
    <td><input name="email" type="text" value="<s:property value="#session.modify_user.email" />"/>
    <s:fielderror fieldName="emailError"/>
    </td>
  </tr>
  
  <tr>
    <td>电话：</td>
    <td><input name="phone" type="text" value="<s:property value="#session.modify_user.phone" />"/>
    <s:fielderror fieldName="phoneError"/>
    </td>
  </tr>
  
  <tr>
    <td>邮编：</td>
    <td><input name="postcode" type="text" value="<s:property value="#session.modify_user.postcode" />"/>
    <s:fielderror fieldName="postcodeError"/>
    </td>
  </tr>
  <tr>
    <td colspan="2" align="center"><input class="button" type="submit" value="修改"></td>
  </tr>
</table>
</form>
  </body>
</html>
